<template>
	<view class="content">
		<web-view class="file-content" :src="src"></web-view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				src: '',
			}
		},
		onLoad(options) {
			let url = decodeURIComponent(options.url);
			if (url.includes('.doc')) {
				this.src = 'https://view.officeapps.live.com/op/embed.aspx?src=' + url;
			} else {
				this.src = url;
			}
		},
		methods: {

		}
	}
</script>

<style scoped lang="scss">
.content{
	padding: 0 20rpx;
	scale:20;
	.file-content{
		width: 100% !important;
	}
}
</style>
